const app = getApp();

Component({
  data: {
    selected: 0,
    tabList: [],
    color: "#FFF",
    selectedColor: "#6D55ED",
    length: []
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({
        url,
      })
      app.globalData.selected = data.index
    },
    setList() {
      this.setData({
        tabList: app.globalData.tabList
      })
    }
  },
})